﻿<Window x:Class="CodeAngel.UI.SelectDomainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:CodeAngel.UI"
        Title="Select Domain" Height="300" Width="300" WindowStartupLocation="CenterOwner"  WindowStyle="ToolWindow">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <ItemsControl x:Name="DomainListBox" ItemsSource="{Binding AvailableDomains}" Margin="6" >
            <ItemsControl.ItemTemplate>
                <DataTemplate>
                    <local:ListItemControl OpenCommand="{Binding ElementName=DomainListBox, Path=DataContext.OpenDomainCommand}"
                                           DeleteCommand="{Binding ElementName=DomainListBox, Path=DataContext.DeleteDomainCommand}" >
                        <TextBlock Text="{Binding Name}" FontWeight="Bold" VerticalAlignment="Center" Margin="3"/>
                    </local:ListItemControl>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ItemsControl>

    </Grid>
</Window>
